package com.sc.nft.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.dto.DaoSchoolArticleMaterialSaveAdminDTO;
import com.sc.nft.entity.dto.DaoSchoolMaterialArticlePageAdminDTO;
import com.sc.nft.entity.vo.ArticleMaterialVO;
import com.sc.nft.entity.vo.DaoSchoolMaterialArticlePageAdminVO;

import java.util.List;

/**
 * 素材表与文章表关联表(DaoSchoolArticleMaterial)表服务接口
 *
 * @author makejava
 * @since 2023-03-13 16:21:33
 */
public interface DaoSchoolArticleMaterialService {

    /**
     * 根据文章id删除列表
     *
     * @param id
     * @return
     */
    Boolean deleteByArticleId(Long id);

    /**
     * 后台获取分页列表
     *
     * @param pageRequest
     * @return
     */
    Page<DaoSchoolMaterialArticlePageAdminVO> pageAdmin(DaoSchoolMaterialArticlePageAdminDTO daoSchoolMaterialArticlePageAdminDTO);

    /**
     * 后台获取分页列表
     *
     * @param daoSchoolMaterialArticlePageAdminDTO
     * @return
     */
    Page<DaoSchoolMaterialArticlePageAdminVO> pageNotAdmin(DaoSchoolMaterialArticlePageAdminDTO daoSchoolMaterialArticlePageAdminDTO);

    /**
     * 删除文章
     *
     * @param id
     * @return
     */
    Boolean deleteById(Long id);



    /**
     * 新增附件
     *
     * @param listInfo
     * @return
     */
    Boolean saveAdmin(List<DaoSchoolArticleMaterialSaveAdminDTO> listInfo);

    /**
     * 根据文章id获取关联数据
     *
     * @param id
     * @return
     */
    List<ArticleMaterialVO> selectByArticleId(Long id);

}
